//
//  MKConstants.h
//  MAKCommon
//
//  Created by zhuwh on 2017/11/30.
//  Copyright © 2017年 mark. All rights reserved.
//

#define MAK_SCREEN_WIDTH  [UIScreen mainScreen].bounds.size.width
#define MAK_SCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height
#define MAK_WS(wSelf)           __weak typeof(self) wSelf = self
#define MAK_SS(sSelf)           __strong typeof(wSelf) sSelf = wSelf

#define MAK_DOWNLOAD_DIR [NSSearchPathForDirectoriesInDomains( NSDownloadsDirectory, NSUserDomainMask, YES) lastObject]
#define MAK_DOWNLOAD_DIR [NSSearchPathForDirectoriesInDomains( NSDownloadsDirectory, NSUserDomainMask, YES) lastObject]
#define MAK_CACHE_DIR [NSSearchPathForDirectoriesInDomains( NSCachesDirectory, NSUserDomainMask, YES) lastObject]

#define MAK_ViewSafeAreaInsets(view) ({UIEdgeInsets insets; if(@available(iOS 11.0, *)) {insets = view.safeAreaInsets;} else {insets = UIEdgeInsetsZero;} insets;})

// 过期
#define MAKExtensionDeprecated(instead) NS_DEPRECATED(2_0, 2_0, 2_0, 2_0, instead)
